#ifndef _API_H_
#define _API_H_
	
#include "../include/mystdafx.h"

using namespace std;

	
	DWORD	os_gettickcount();
	int		os_getmodulefilename( char* sFileName, int nSize);
	int		os_getmodulepath( char* sFileName, int nSize);
	std::string os_getprogramname();
	
	

	/*std::string	SecsToFormat(tm& t);
	std::string	SecsToFormatYMD(tm& t);
	std::string	SecsToFormat(time_t secs);
	std::string	SecsToFormatYMD(time_t secs);
	time_t		GetNowTime();
	std::string GetNowTimeString();*/

	char* 	strupr(char* ioString);
	char* 	strlwr(char* ioString);
	int 	os_stricmp(const char* src, const char* dst);
	void 	strsplit( const string &src, const string &sep, vector<string>& result );


	typedef bool (*LPTRAVERSEDIRFUNC)(const char* filename);
	void	FileTraverse(const char* path, LPTRAVERSEDIRFUNC func);

//	#ifndef WIN32
//	void init_daemon(void);
//	#endif
//
//#ifndef WIN32
//	int code_convert(char *from_charset,char *to_charset,char *inbuf,int inlen,char *outbuf,int outlen);
//	int u2g(char *inbuf,size_t inlen,char *outbuf,size_t outlen);
//	int g2u(char *inbuf,size_t inlen,char *outbuf,size_t outlen);
//#endif

	std::string GetNowTimeString();
	std::string	SecsToFormat(time_t secs);
	std::string	SecsToFormat(tm& t);
#endif
